.class public Lcom/brixd/niceapp/community/model/CommunityAppModel;
.super Lcom/brixd/niceapp/model/BaseAppModel;
.source "CommunityAppModel.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;
    }
.end annotation


# static fields
.field private static final serialVersionUID:J = 0x4a0d8dda8a8da00eL


# instance fields
.field private appName:Ljava/lang/String;

.field private authorBgColor:Ljava/lang/String;

.field private authorFlowers:I

.field private authorGender:Ljava/lang/String;

.field private authorIdentity:I

.field private bgUrl:Ljava/lang/String;

.field private isTestingApp:Z

.field private isTestingOver:Z

.field private pageUrl:Ljava/lang/String;

.field private pos:I

.field private source:Ljava/lang/String;

.field private sourceTitle:Ljava/lang/String;

.field private type:Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 22
    invoke-direct {p0}, Lcom/brixd/niceapp/model/BaseAppModel;-><init>()V

    .line 41
    sget-object v0, Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;->TYPE_APP:Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    iput-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->type:Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    return-void
.end method

.method public static parseAppModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .registers 13
    .param p0, "jsonApp"    # Lorg/json/JSONObject;

    .prologue
    .line 163
    new-instance v8, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-direct {v8}, Lcom/brixd/niceapp/community/model/CommunityAppModel;-><init>()V

    .line 164
    .local v8, "model":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    const-string v9, "id"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setId(I)V

    .line 165
    const-string v9, "pos"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setPos(I)V

    .line 167
    const-string v9, "tags"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v9

    invoke-static {v9}, Lcom/brixd/niceapp/model/TagModel;->parseTagModels(Lorg/json/JSONArray;)Ljava/util/List;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTags(Ljava/util/List;)V

    .line 169
    const-string v9, "title"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppName(Ljava/lang/String;)V

    .line 170
    const-string v9, "title"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTitle(Ljava/lang/String;)V

    .line 171
    const-string v9, "sub_title"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSubTitle(Ljava/lang/String;)V

    .line 172
    const-string v9, "cover_image"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setCoverImageUrl(Ljava/lang/String;)V

    .line 173
    const-string v9, "package_name"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setPackageName(Ljava/lang/String;)V

    .line 174
    const-string v9, "description"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setDigest(Ljava/lang/String;)V

    .line 175
    const-string v9, "author_id"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorId(I)V

    .line 176
    const-string v9, "author_name"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorName(Ljava/lang/String;)V

    .line 177
    const-string v9, "author_career"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorCareer(Ljava/lang/String;)V

    .line 178
    const-string v9, "author_avatar_url"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorAvatarUrl(Ljava/lang/String;)V

    .line 179
    const-string v9, "author_bgcolor"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorBgColor(Ljava/lang/String;)V

    .line 180
    const-string v9, "author_gender"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorGender(Ljava/lang/String;)V

    .line 181
    const-string v9, "author_flowers"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorFlowers(I)V

    .line 182
    const-string v9, "author_identity"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAuthorIdentity(I)V

    .line 183
    const-string v9, "show_times"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setShowTimes(I)V

    .line 184
    const-string v9, "up_times"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setUpTimes(I)V

    .line 185
    const-string v9, "comment_times"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setCommentTimes(I)V

    .line 186
    const-string v9, "icon_image"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setIconUrl(Ljava/lang/String;)V

    .line 187
    const-string v9, "size"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppSize(Ljava/lang/String;)V

    .line 188
    const-string v9, "is_beta"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTestingApp(Z)V

    .line 189
    const-string v9, "is_beta_end"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z

    move-result v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTestingOver(Z)V

    .line 190
    const-string v9, "min_sdk_version"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    if-nez v9, :cond_18a

    const/4 v9, -0x1

    :goto_ea
    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setMinSdkVer(I)V

    .line 192
    const-string v9, "all_images"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    .line 193
    .local v4, "images":Lorg/json/JSONArray;
    invoke-virtual {v4}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setContent(Ljava/lang/String;)V

    .line 197
    new-instance v2, Lcom/brixd/niceapp/model/EstimateModel;

    invoke-direct {v2}, Lcom/brixd/niceapp/model/EstimateModel;-><init>()V

    .line 198
    .local v2, "estimateModel":Lcom/brixd/niceapp/model/EstimateModel;
    invoke-virtual {v8}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v9

    invoke-virtual {v2, v9}, Lcom/brixd/niceapp/model/EstimateModel;->setAppId(I)V

    .line 199
    const-string v9, "up_times"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v2, v9}, Lcom/brixd/niceapp/model/EstimateModel;->setUpNum(I)V

    .line 200
    const-string v9, "down_times"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    invoke-virtual {v2, v9}, Lcom/brixd/niceapp/model/EstimateModel;->setDownNum(I)V

    .line 201
    const-string v9, "up_users"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v9

    invoke-static {v9}, Lcom/brixd/niceapp/model/CommonUserModel;->parseUserModels(Lorg/json/JSONArray;)Ljava/util/ArrayList;

    move-result-object v9

    invoke-virtual {v2, v9}, Lcom/brixd/niceapp/model/EstimateModel;->setUpUsers(Ljava/util/ArrayList;)V

    .line 203
    const-string v9, ""

    invoke-virtual {v2, v9}, Lcom/brixd/niceapp/model/EstimateModel;->setSource(Ljava/lang/String;)V

    .line 204
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v9

    invoke-virtual {v9}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v10

    invoke-virtual {v2, v10, v11}, Lcom/brixd/niceapp/model/EstimateModel;->setTimeUpdatedInMillis(J)V

    .line 206
    invoke-virtual {v8, v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setEstimateModel(Lcom/brixd/niceapp/model/EstimateModel;)V

    .line 207
    const-string v9, "comments"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v9

    invoke-static {v9}, Lcom/brixd/niceapp/model/CommentModel;->parseCommentModels(Lorg/json/JSONArray;)Ljava/util/ArrayList;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setCommentModels(Ljava/util/ArrayList;)V

    .line 208
    const-string v9, "same_apps"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v9

    invoke-static {v9}, Lcom/brixd/niceapp/model/ShortAppModel;->parseModels(Lorg/json/JSONArray;)Ljava/util/List;

    move-result-object v9

    invoke-virtual {v8, v9}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSameApps(Ljava/util/List;)V

    .line 210
    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    .line 211
    .local v1, "downloadUrls":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v9, "download_urls"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v6

    .line 212
    .local v6, "jsonArray":Lorg/json/JSONArray;
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_15e
    invoke-virtual {v6}, Lorg/json/JSONArray;->length()I

    move-result v9

    if-ge v3, v9, :cond_1c6

    .line 213
    invoke-virtual {v6, v3}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v5

    .line 214
    .local v5, "jo":Lorg/json/JSONObject;
    const-string v9, "channel"

    invoke-virtual {v5, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    .line 215
    .local v7, "marketName":Ljava/lang/String;
    const-string v9, "direct"

    invoke-virtual {v7, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_192

    .line 216
    const-string v9, "url"

    invoke-virtual {v5, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 217
    .local v0, "downloadUrl":Ljava/lang/String;
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_187

    .line 218
    const-string v9, "Direct"

    invoke-virtual {v1, v9, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 212
    .end local v0    # "downloadUrl":Ljava/lang/String;
    :cond_187
    :goto_187
    add-int/lit8 v3, v3, 0x1

    goto :goto_15e

    .line 190
    .end local v1    # "downloadUrls":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    .end local v2    # "estimateModel":Lcom/brixd/niceapp/model/EstimateModel;
    .end local v3    # "i":I
    .end local v4    # "images":Lorg/json/JSONArray;
    .end local v5    # "jo":Lorg/json/JSONObject;
    .end local v6    # "jsonArray":Lorg/json/JSONArray;
    .end local v7    # "marketName":Ljava/lang/String;
    :cond_18a
    const-string v9, "min_sdk_version"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v9

    goto/16 :goto_ea

    .line 220
    .restart local v1    # "downloadUrls":Ljava/util/HashMap;, "Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    .restart local v2    # "estimateModel":Lcom/brixd/niceapp/model/EstimateModel;
    .restart local v3    # "i":I
    .restart local v4    # "images":Lorg/json/JSONArray;
    .restart local v5    # "jo":Lorg/json/JSONObject;
    .restart local v6    # "jsonArray":Lorg/json/JSONArray;
    .restart local v7    # "marketName":Ljava/lang/String;
    :cond_192
    const-string v9, "wandoujia"

    invoke-virtual {v7, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_1ac

    .line 221
    const-string v9, "url"

    invoke-virtual {v5, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 222
    .restart local v0    # "downloadUrl":Ljava/lang/String;
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_187

    .line 223
    const-string v9, "Wandoujia"

    invoke-virtual {v1, v9, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_187

    .line 225
    .end local v0    # "downloadUrl":Ljava/lang/String;
    :cond_1ac
    const-string v9, "googleplay"

    invoke-virtual {v7, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_187

    .line 226
    const-string v9, "url"

    invoke-virtual {v5, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 227
    .restart local v0    # "downloadUrl":Ljava/lang/String;
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_187

    .line 228
    const-string v9, "GooglePlay"

    invoke-virtual {v1, v9, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_187

    .line 232
    .end local v0    # "downloadUrl":Ljava/lang/String;
    .end local v5    # "jo":Lorg/json/JSONObject;
    .end local v7    # "marketName":Ljava/lang/String;
    :cond_1c6
    invoke-virtual {v8, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setDownloadUrls(Ljava/util/HashMap;)V

    .line 234
    return-object v8
.end method

.method public static parseAppModels(Lorg/json/JSONObject;)Ljava/util/ArrayList;
    .registers 7
    .param p0, "jo"    # Lorg/json/JSONObject;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONObject;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 148
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 150
    .local v4, "list":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/CommunityAppModel;>;"
    const-string v5, "apps"

    invoke-virtual {p0, v5}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    .line 151
    .local v3, "jsonApps":Lorg/json/JSONArray;
    if-eqz v3, :cond_22

    .line 152
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_e
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v5

    if-ge v1, v5, :cond_22

    .line 153
    invoke-virtual {v3, v1}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v2

    .line 154
    .local v2, "jsonApp":Lorg/json/JSONObject;
    invoke-static {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->parseAppModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/community/model/CommunityAppModel;

    move-result-object v0

    .line 155
    .local v0, "appModel":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    invoke-virtual {v4, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 152
    add-int/lit8 v1, v1, 0x1

    goto :goto_e

    .line 159
    .end local v0    # "appModel":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .end local v1    # "i":I
    .end local v2    # "jsonApp":Lorg/json/JSONObject;
    :cond_22
    return-object v4
.end method

.method public static parseFavAppModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .registers 3
    .param p0, "jsonApp"    # Lorg/json/JSONObject;

    .prologue
    .line 252
    new-instance v0, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-direct {v0}, Lcom/brixd/niceapp/community/model/CommunityAppModel;-><init>()V

    .line 253
    .local v0, "model":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    const-string v1, "id"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setId(I)V

    .line 255
    const-string v1, "title"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setAppName(Ljava/lang/String;)V

    .line 256
    const-string v1, "title"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setTitle(Ljava/lang/String;)V

    .line 257
    const-string v1, "icon"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setIconUrl(Ljava/lang/String;)V

    .line 258
    const-string v1, "up_times"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setUpTimes(I)V

    .line 259
    const-string v1, "comment_times"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setCommentTimes(I)V

    .line 260
    const-string v1, "source"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSource(Ljava/lang/String;)V

    .line 261
    const-string v1, "source_msg"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->setSourceTitle(Ljava/lang/String;)V

    .line 263
    return-object v0
.end method

.method public static parseFavAppModels(Lorg/json/JSONObject;)Ljava/util/ArrayList;
    .registers 7
    .param p0, "jo"    # Lorg/json/JSONObject;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONObject;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 239
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 241
    .local v4, "list":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/CommunityAppModel;>;"
    const-string v5, "collections"

    invoke-virtual {p0, v5}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    .line 242
    .local v3, "jsonApps":Lorg/json/JSONArray;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_c
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v5

    if-ge v1, v5, :cond_20

    .line 243
    invoke-virtual {v3, v1}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v2

    .line 244
    .local v2, "jsonApp":Lorg/json/JSONObject;
    invoke-static {v2}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->parseFavAppModel(Lorg/json/JSONObject;)Lcom/brixd/niceapp/community/model/CommunityAppModel;

    move-result-object v0

    .line 245
    .local v0, "appModel":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    invoke-virtual {v4, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 242
    add-int/lit8 v1, v1, 0x1

    goto :goto_c

    .line 248
    .end local v0    # "appModel":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .end local v2    # "jsonApp":Lorg/json/JSONObject;
    :cond_20
    return-object v4
.end method


# virtual methods
.method public getAppName()Ljava/lang/String;
    .registers 2

    .prologue
    .line 52
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->appName:Ljava/lang/String;

    return-object v0
.end method

.method public getAuthorBgColor()Ljava/lang/String;
    .registers 2

    .prologue
    .line 60
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorBgColor:Ljava/lang/String;

    return-object v0
.end method

.method public getAuthorFlowers()I
    .registers 2

    .prologue
    .line 76
    iget v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorFlowers:I

    return v0
.end method

.method public getAuthorGender()Ljava/lang/String;
    .registers 2

    .prologue
    .line 68
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorGender:Ljava/lang/String;

    return-object v0
.end method

.method public getAuthorIdentity()I
    .registers 2

    .prologue
    .line 140
    iget v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorIdentity:I

    return v0
.end method

.method public getBgUrl()Ljava/lang/String;
    .registers 2

    .prologue
    .line 108
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->bgUrl:Ljava/lang/String;

    return-object v0
.end method

.method public getPageUrl()Ljava/lang/String;
    .registers 2

    .prologue
    .line 116
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->pageUrl:Ljava/lang/String;

    return-object v0
.end method

.method public getPos()I
    .registers 2

    .prologue
    .line 44
    iget v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->pos:I

    return v0
.end method

.method public getSource()Ljava/lang/String;
    .registers 2

    .prologue
    .line 84
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->source:Ljava/lang/String;

    return-object v0
.end method

.method public getSourceTitle()Ljava/lang/String;
    .registers 2

    .prologue
    .line 92
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->sourceTitle:Ljava/lang/String;

    return-object v0
.end method

.method public getType()Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;
    .registers 2

    .prologue
    .line 100
    iget-object v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->type:Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    return-object v0
.end method

.method public isTestingApp()Z
    .registers 2

    .prologue
    .line 124
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->isTestingApp:Z

    return v0
.end method

.method public isTestingOver()Z
    .registers 2

    .prologue
    .line 132
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->isTestingOver:Z

    return v0
.end method

.method public parseDetailModels()Ljava/util/ArrayList;
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/model/DetailModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 270
    :try_start_0
    new-instance v2, Lorg/json/JSONArray;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getContent()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v4}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V

    .line 271
    .local v2, "images":Lorg/json/JSONArray;
    invoke-static {v2}, Lcom/brixd/niceapp/model/DetailModel;->parseCommunityDetailModels(Lorg/json/JSONArray;)Ljava/util/ArrayList;

    move-result-object v0

    .line 274
    .local v0, "detailModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/DetailModel;>;"
    new-instance v3, Lcom/brixd/niceapp/model/DetailModel;

    invoke-direct {v3}, Lcom/brixd/niceapp/model/DetailModel;-><init>()V

    .line 275
    .local v3, "model":Lcom/brixd/niceapp/model/DetailModel;
    sget-object v4, Lcom/brixd/niceapp/model/DetailModel$DetailType;->TYPE_RECOMMEND:Lcom/brixd/niceapp/model/DetailModel$DetailType;

    invoke-virtual {v3, v4}, Lcom/brixd/niceapp/model/DetailModel;->setType(Lcom/brixd/niceapp/model/DetailModel$DetailType;)V

    .line 276
    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_1a
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_1a} :catch_1b

    .line 282
    .end local v2    # "images":Lorg/json/JSONArray;
    .end local v3    # "model":Lcom/brixd/niceapp/model/DetailModel;
    :goto_1a
    return-object v0

    .line 277
    .end local v0    # "detailModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/DetailModel;>;"
    :catch_1b
    move-exception v1

    .line 278
    .local v1, "e":Lorg/json/JSONException;
    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

    .line 279
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .restart local v0    # "detailModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/DetailModel;>;"
    goto :goto_1a
.end method

.method public setAppName(Ljava/lang/String;)V
    .registers 2
    .param p1, "appName"    # Ljava/lang/String;

    .prologue
    .line 56
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->appName:Ljava/lang/String;

    .line 57
    return-void
.end method

.method public setAuthorBgColor(Ljava/lang/String;)V
    .registers 2
    .param p1, "authorBgColor"    # Ljava/lang/String;

    .prologue
    .line 64
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorBgColor:Ljava/lang/String;

    .line 65
    return-void
.end method

.method public setAuthorFlowers(I)V
    .registers 2
    .param p1, "authorFlowers"    # I

    .prologue
    .line 80
    iput p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorFlowers:I

    .line 81
    return-void
.end method

.method public setAuthorGender(Ljava/lang/String;)V
    .registers 2
    .param p1, "authorGender"    # Ljava/lang/String;

    .prologue
    .line 72
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorGender:Ljava/lang/String;

    .line 73
    return-void
.end method

.method public setAuthorIdentity(I)V
    .registers 2
    .param p1, "authorIdentity"    # I

    .prologue
    .line 144
    iput p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->authorIdentity:I

    .line 145
    return-void
.end method

.method public setBgUrl(Ljava/lang/String;)V
    .registers 2
    .param p1, "bgUrl"    # Ljava/lang/String;

    .prologue
    .line 112
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->bgUrl:Ljava/lang/String;

    .line 113
    return-void
.end method

.method public setPageUrl(Ljava/lang/String;)V
    .registers 2
    .param p1, "pageUrl"    # Ljava/lang/String;

    .prologue
    .line 120
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->pageUrl:Ljava/lang/String;

    .line 121
    return-void
.end method

.method public setPos(I)V
    .registers 2
    .param p1, "pos"    # I

    .prologue
    .line 48
    iput p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->pos:I

    .line 49
    return-void
.end method

.method public setSource(Ljava/lang/String;)V
    .registers 2
    .param p1, "source"    # Ljava/lang/String;

    .prologue
    .line 88
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->source:Ljava/lang/String;

    .line 89
    return-void
.end method

.method public setSourceTitle(Ljava/lang/String;)V
    .registers 2
    .param p1, "sourceTitle"    # Ljava/lang/String;

    .prologue
    .line 96
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->sourceTitle:Ljava/lang/String;

    .line 97
    return-void
.end method

.method public setTestingApp(Z)V
    .registers 2
    .param p1, "isTestingApp"    # Z

    .prologue
    .line 128
    iput-boolean p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->isTestingApp:Z

    .line 129
    return-void
.end method

.method public setTestingOver(Z)V
    .registers 2
    .param p1, "isTestingOver"    # Z

    .prologue
    .line 136
    iput-boolean p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->isTestingOver:Z

    .line 137
    return-void
.end method

.method public setType(Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;)V
    .registers 2
    .param p1, "type"    # Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    .prologue
    .line 104
    iput-object p1, p0, Lcom/brixd/niceapp/community/model/CommunityAppModel;->type:Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    .line 105
    return-void
.end method
